File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -5,3 +5,5 @@ main = do
55
66 let (foo,bar) = (123, "foo")
77 Text.putStrLn bar
8+
9+ Monad.return ()
Original file line number Diff line number Diff line change @@ -328,7 +328,10 @@ data Forall where
328328 Final :: (forall g . Typed (Term g )) -> Forall
329329
330330lit :: Type. Typeable a => a -> UTerm ()
331- lit l = UForall HSE. noSrcSpan () [] (Final (Typed (Type. typeOf l) (Lit l))) [] (fromSomeStarType (SomeStarType (Type. typeOf l))) []
331+ lit = litWithSpan HSE. noSrcSpan
332+
333+ litWithSpan :: Type. Typeable a => HSE. SrcSpanInfo -> a -> UTerm ()
334+ litWithSpan srcSpanInfo l = UForall srcSpanInfo () [] (Final (Typed (Type. typeOf l) (Lit l))) [] (fromSomeStarType (SomeStarType (Type. typeOf l))) []
332335
333336data SomeStarType = forall (a :: Type ). SomeStarType (TypeRep a )
334337deriving instance Show SomeStarType
@@ -611,7 +614,9 @@ desugarPolyQName qname treps =
611614 HSE. UnQual l (HSE. Symbol _ string)
612615 | Just (forall', vars, irep, _) <- Map. lookup string polyLits -> do
613616 pure (UForall l () treps forall' vars irep [] )
614- _ -> Left $ InvalidVariable $ HSE. prettyPrint qname
617+ HSE. Special l (HSE. UnitCon {}) ->
618+ pure $ litWithSpan l ()
619+ _ -> Left $ InvalidVariable $ show qname
615620
616621desugarArg :: HSE. Pat HSE. SrcSpanInfo -> Either DesugarError (Binding , Maybe SomeStarType )
617622desugarArg (HSE. PatTypeSig _ (HSE. PVar _ (HSE. Ident _ i)) typ) =
You can’t perform that action at this time.
0 commit comments