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 @@ -327,7 +327,10 @@ data Forall where
327327 Final :: (forall g . Typed (Term g )) -> Forall
328328
329329lit :: Type. Typeable a => a -> UTerm ()
330- lit l = UForall HSE. noSrcSpan () [] (Final (Typed (Type. typeOf l) (Lit l))) [] (fromSomeStarType (SomeStarType (Type. typeOf l))) []
330+ lit = litWithSpan HSE. noSrcSpan
331+
332+ litWithSpan :: Type. Typeable a => HSE. SrcSpanInfo -> a -> UTerm ()
333+ litWithSpan srcSpanInfo l = UForall srcSpanInfo () [] (Final (Typed (Type. typeOf l) (Lit l))) [] (fromSomeStarType (SomeStarType (Type. typeOf l))) []
331334
332335data SomeStarType = forall (a :: Type ). SomeStarType (TypeRep a )
333336deriving instance Show SomeStarType
@@ -610,7 +613,9 @@ desugarPolyQName qname treps =
610613 HSE. UnQual l (HSE. Symbol _ string)
611614 | Just (forall', vars, irep, _) <- Map. lookup string polyLits -> do
612615 pure (UForall l () treps forall' vars irep [] )
613- _ -> Left $ InvalidVariable $ HSE. prettyPrint qname
616+ HSE. Special l (HSE. UnitCon {}) ->
617+ pure $ litWithSpan l ()
618+ _ -> Left $ InvalidVariable $ show qname
614619
615620desugarArg :: HSE. Pat HSE. SrcSpanInfo -> Either DesugarError (Binding , Maybe SomeStarType )
616621desugarArg (HSE. PatTypeSig _ (HSE. PVar _ (HSE. Ident _ i)) typ) =
You can’t perform that action at this time.
0 commit comments