Skip to content

Commit

Permalink
Update import settings
Browse files Browse the repository at this point in the history
  • Loading branch information
jhbertra committed Nov 11, 2021
1 parent 97a72a5 commit 24ed930
Show file tree
Hide file tree
Showing 17 changed files with 225 additions and 33 deletions.
File renamed without changes.
3 changes: 2 additions & 1 deletion .tidyrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"importWrap": "source",
"importSort": "ide",
"importWrap": "auto",
"indent": 2,
"operatorsFile": ".tidyoperators",
"ribbon": 1,
Expand Down
12 changes: 2 additions & 10 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -121,18 +121,10 @@

fix-purs-tidy = pkgs.writeShellScriptBin "fix-purs-tidy" ''
set -e
echo updating operators file...
${fd}/bin/fd \
--no-ignore \
--hidden \
--extension purs \
--exclude '*/.spago/*/*/test/*' \
--exclude '.spago/*/*/test/*' \
--exec-batch ${purs-tidy}/bin/purs-tidy generate-operators {} > .tidyoperators || true
echo formatting PureScript files...
${fd}/bin/fd \
--extension purs \
--exec-batch ${purs-tidy}/bin/purs-tidy format-in-place {} || true
--exec-batch ${purs-tidy}/bin/purs-tidy format-in-place {}
echo done.
'';

Expand All @@ -144,7 +136,7 @@
--extension ts \
--extension css \
--extension html \
--exec-batch ${prettier}/bin/prettier -w format-in-place {} || true
--exec-batch ${prettier}/bin/prettier -w format-in-place {}
echo done.
'';

Expand Down
18 changes: 16 additions & 2 deletions src/Component/Expand.purs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,22 @@ module Component.Expand

import Prologue
import Component.Expand.State (handleAction, handleQuery, initialState)
import Component.Expand.Types (Action(..), Component, ComponentHTML, Slot, State)
import Component.Expand.Types (Action, Component, ComponentHTML, Input, Query(..), Slot, State(..)) as Types
import Component.Expand.Types
( Action(..)
, Component
, ComponentHTML
, Slot
, State
)
import Component.Expand.Types
( Action
, Component
, ComponentHTML
, Input
, Query(..)
, Slot
, State(..)
) as Types
import Type.Proxy (Proxy(..))
import Halogen as H
import Halogen.HTML as HH
Expand Down
46 changes: 42 additions & 4 deletions src/Component/Hint/State.purs
Original file line number Diff line number Diff line change
@@ -1,10 +1,39 @@
module Component.Hint.State (component, hint) where

import Prologue
import Component.Hint.Lenses (_active, _content, _mGlobalClickSubscription, _mPopperInstance, _placement)
import Component.Hint.Types (Action(..), Input, State, arrowRef, hintRef, popoutRef)
import Component.Hint.Lenses
( _active
, _content
, _mGlobalClickSubscription
, _mPopperInstance
, _placement
)
import Component.Hint.Types
( Action(..)
, Input
, State
, arrowRef
, hintRef
, popoutRef
)
import Component.Hint.View (render)
import Component.Popper (OffsetOption(..), PaddingOption(..), Placement, PositioningStrategy(..), arrow, createPopper, defaultFlip, defaultModifiers, defaultPreventOverflow, destroyPopper, flipPlacement, forceUpdate, offset, pAll, preventOverflow)
import Component.Popper
( OffsetOption(..)
, PaddingOption(..)
, Placement
, PositioningStrategy(..)
, arrow
, createPopper
, defaultFlip
, defaultModifiers
, defaultPreventOverflow
, destroyPopper
, flipPlacement
, forceUpdate
, offset
, pAll
, preventOverflow
)
import Control.Monad.Maybe.Trans (MaybeT(..), runMaybeT)
import Control.MonadPlus (guard)
import Data.Filterable (filterMap)
Expand All @@ -14,7 +43,16 @@ import Data.Lens (assign, set, use)
import Data.Traversable (for, traverse)
import Effect (Effect)
import Effect.Aff.Class (class MonadAff)
import Halogen (Component, HalogenM, Slot, get, getHTMLElementRef, liftEffect, mkComponent, modify_)
import Halogen
( Component
, HalogenM
, Slot
, get
, getHTMLElementRef
, liftEffect
, mkComponent
, modify_
)
import Halogen as H
import Halogen.HTML (ComponentHTML, PlainHTML, slot)
import Halogen.Query.Event.Extra (eventListenerEffect)
Expand Down
14 changes: 13 additions & 1 deletion src/Component/Popper.purs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,19 @@ module Component.Popper
) where

import Component.Popper.Types
import Component.Popper.Internal (createPopper, forceUpdate, destroyPopper, arrow, computeStyles, applyStyles, eventListeners, popperOffsets, offset, preventOverflow, flipPlacement) as ExportedInternal
import Component.Popper.Internal
( createPopper
, forceUpdate
, destroyPopper
, arrow
, computeStyles
, applyStyles
, eventListeners
, popperOffsets
, offset
, preventOverflow
, flipPlacement
) as ExportedInternal

defaultModifiers :: Array Modifier
defaultModifiers =
Expand Down
20 changes: 19 additions & 1 deletion src/Component/Popper/Internal.purs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,25 @@ module Component.Popper.Internal

import Prelude

import Component.Popper.Types (Boundary(..), ComputeStyleOptions, EventListenerOptions, Modifier, Offset, OffsetOption(..), Options, Padding(..), PaddingOption(..), Placement(..), PopperInstance, PositioningStrategy(..), PreventOverflowOptions, Rect, RootBoundary(..), TetherOffsetOption(..), FlipOptions)
import Component.Popper.Types
( Boundary(..)
, ComputeStyleOptions
, EventListenerOptions
, Modifier
, Offset
, OffsetOption(..)
, Options
, Padding(..)
, PaddingOption(..)
, Placement(..)
, PopperInstance
, PositioningStrategy(..)
, PreventOverflowOptions
, Rect
, RootBoundary(..)
, TetherOffsetOption(..)
, FlipOptions
)
import Data.Argonaut.Core (Json, fromNumber, fromString)
import Data.Argonaut.Encode (encodeJson)
import Data.Array as Array
Expand Down
45 changes: 41 additions & 4 deletions src/Component/Tooltip/State.purs
Original file line number Diff line number Diff line change
@@ -1,17 +1,54 @@
module Component.Tooltip.State (component, tooltip) where

import Prologue
import Component.Popper (OffsetOption(..), PaddingOption(..), Placement, PositioningStrategy(..), arrow, createPopper, defaultFlip, defaultModifiers, defaultPreventOverflow, destroyPopper, flipPlacement, forceUpdate, offset, pAll, preventOverflow)
import Component.Tooltip.Lenses (_active, _mPopperInstance, _message, _placement)
import Component.Tooltip.Types (Action(..), Input, ReferenceId(..), State, arrowRef, tooltipRef)
import Component.Popper
( OffsetOption(..)
, PaddingOption(..)
, Placement
, PositioningStrategy(..)
, arrow
, createPopper
, defaultFlip
, defaultModifiers
, defaultPreventOverflow
, destroyPopper
, flipPlacement
, forceUpdate
, offset
, pAll
, preventOverflow
)
import Component.Tooltip.Lenses
( _active
, _mPopperInstance
, _message
, _placement
)
import Component.Tooltip.Types
( Action(..)
, Input
, ReferenceId(..)
, State
, arrowRef
, tooltipRef
)
import Component.Tooltip.View (render)
import Control.Bind (bindFlipped)
import Control.Monad.Maybe.Trans (MaybeT(..), runMaybeT)
import Data.Foldable (for_)
import Data.Lens (assign, set, use)
import Effect (Effect)
import Effect.Aff.Class (class MonadAff)
import Halogen (Component, HalogenM, Slot, get, getHTMLElementRef, liftEffect, mkComponent, modify_)
import Halogen
( Component
, HalogenM
, Slot
, get
, getHTMLElementRef
, liftEffect
, mkComponent
, modify_
)
import Halogen as H
import Halogen.HTML (ComponentHTML, slot)
import Halogen.Query.Event (eventListener)
Expand Down
7 changes: 6 additions & 1 deletion src/Control/Monad/Error/Extra.purs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@ module Control.Monad.Error.Extra where

import Control.Monad (pure, (=<<))
import Control.Monad.Except (Except)
import Control.Monad.Except.Trans (class MonadThrow, ExceptT, runExceptT, throwError)
import Control.Monad.Except.Trans
( class MonadThrow
, ExceptT
, runExceptT
, throwError
)
import Data.Either (Either(..), either)
import Data.Function (($), (<<<))
import Data.Newtype (unwrap)
Expand Down
7 changes: 6 additions & 1 deletion src/Data/Argonaut/Extra.purs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ module Data.Argonaut.Extra where
import Prologue

import Data.Argonaut.Core (stringify)
import Data.Argonaut.Decode (class DecodeJson, JsonDecodeError, decodeJson, parseJson)
import Data.Argonaut.Decode
( class DecodeJson
, JsonDecodeError
, decodeJson
, parseJson
)
import Data.Argonaut.Encode (class EncodeJson, encodeJson)

parseDecodeJson
Expand Down
8 changes: 7 additions & 1 deletion src/Halogen/ElementResize.purs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ import Data.Array (head)
import Data.Traversable (traverse_)
import Halogen.Subscription as HS
import Web.DOM (Element)
import Web.DOM.ResizeObserver (ResizeObserverBoxOptions, ResizeObserverEntry, observe, resizeObserver, unobserve)
import Web.DOM.ResizeObserver
( ResizeObserverBoxOptions
, ResizeObserverEntry
, observe
, resizeObserver
, unobserve
)

elementResize
:: forall action
Expand Down
11 changes: 10 additions & 1 deletion src/Halogen/Extra.purs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,16 @@ import Type.Proxy (Proxy(..))
import Data.Tuple (Tuple(..))
import Effect.Class (class MonadEffect, liftEffect)
import Effect.Uncurried (EffectFn1, runEffectFn1)
import Halogen (Component, ComponentHTML, HalogenF(..), HalogenM(..), RefLabel, Slot, getHTMLElementRef, mkComponent)
import Halogen
( Component
, ComponentHTML
, HalogenF(..)
, HalogenM(..)
, RefLabel
, Slot
, getHTMLElementRef
, mkComponent
)
import Halogen as H
import Halogen.HTML (IProp, div_, slot)
import Halogen.HTML.Core (Prop)
Expand Down
27 changes: 25 additions & 2 deletions src/Halogen/Monaco.purs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@ import Data.Array (catMaybes)
import Data.Enum (class BoundedEnum, class Enum)
import Data.Generic.Rep (class Generic)
import Data.Bounded.Generic (genericBottom, genericTop)
import Data.Enum.Generic (genericCardinality, genericFromEnum, genericPred, genericSucc, genericToEnum)
import Data.Enum.Generic
( genericCardinality
, genericFromEnum
, genericPred
, genericSucc
, genericToEnum
)
import Data.Eq.Generic (genericEq)
import Data.Ord.Generic (genericCompare)
import Data.Lens (Lens', set, use, view)
Expand All @@ -31,7 +37,24 @@ import Halogen.ElementResize (elementResize)
import Halogen.HTML (HTML, div)
import Halogen.HTML.Properties (class_, ref)
import Halogen.Subscription as HS
import Monaco (CodeActionProvider, CompletionItemProvider, DocumentFormattingEditProvider, Editor, HoverProvider, IDisposable, IMarker, IMarkerData, IModelDeltaDecoration, IPosition, IRange, LanguageExtensionPoint, MonarchLanguage, Theme, TokensProvider, dispose)
import Monaco
( CodeActionProvider
, CompletionItemProvider
, DocumentFormattingEditProvider
, Editor
, HoverProvider
, IDisposable
, IMarker
, IMarkerData
, IModelDeltaDecoration
, IPosition
, IRange
, LanguageExtensionPoint
, MonarchLanguage
, Theme
, TokensProvider
, dispose
)
import Monaco as Monaco
import Web.DOM.ResizeObserver (ResizeObserverBoxOptions(..))
import Web.HTML.HTMLElement as HTMLElement
Expand Down
11 changes: 10 additions & 1 deletion src/Halogen/SVG.purs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,16 @@ import DOM.HTML.Indexed (Interactive)
import Data.Array as Array
import Data.Newtype (unwrap)
import Data.String (joinWith)
import Halogen.HTML (AttrName(..), ClassName, ElemName(..), HTML, Namespace(..), Node, elementNS, text)
import Halogen.HTML
( AttrName(..)
, ClassName
, ElemName(..)
, HTML
, Namespace(..)
, Node
, elementNS
, text
)
import Halogen.HTML as HH
import Halogen.HTML.Properties (CSSPixel, IProp)

Expand Down
8 changes: 7 additions & 1 deletion src/Language/Haskell/Monaco.purs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ import Effect.Class (class MonadEffect, liftEffect)
import Effect.Uncurried (EffectFn1, runEffectFn1)
import Halogen (RefLabel(..))
import Halogen.Monaco (Settings)
import Monaco (Editor, IStandaloneThemeData, LanguageExtensionPoint(..), MonarchLanguage, Theme)
import Monaco
( Editor
, IStandaloneThemeData
, LanguageExtensionPoint(..)
, MonarchLanguage
, Theme
)

foreign import monarchTokensProvider_ :: EffectFn1 Unit MonarchLanguage

Expand Down
11 changes: 10 additions & 1 deletion src/Monaco.purs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,16 @@ import Data.Newtype (class Newtype)
import Data.Nullable (Nullable, toMaybe)
import Data.String.Regex (Regex)
import Effect (Effect)
import Effect.Uncurried (EffectFn1, EffectFn2, EffectFn3, EffectFn4, runEffectFn1, runEffectFn2, runEffectFn3, runEffectFn4)
import Effect.Uncurried
( EffectFn1
, EffectFn2
, EffectFn3
, EffectFn4
, runEffectFn1
, runEffectFn2
, runEffectFn3
, runEffectFn4
)
import Foreign.Object (Object)
import Foreign.Object as Object
import Type.Proxy (Proxy(..))
Expand Down
10 changes: 9 additions & 1 deletion src/Text/Pretty.purs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,15 @@ import Data.Array (intersperse)
import Data.BigInt.Argonaut (BigInt)
import Data.BigInt.Argonaut as BigInt
import Data.Foldable (any, fold, intercalate)
import Data.Generic.Rep (class Generic, Argument(..), Constructor(..), NoArguments, Product(..), Sum(..), from)
import Data.Generic.Rep
( class Generic
, Argument(..)
, Constructor(..)
, NoArguments
, Product(..)
, Sum(..)
, from
)
import Data.String.Extra (repeat)
import Data.Symbol (class IsSymbol, reflectSymbol)
import Type.Proxy (Proxy(..))
Expand Down

0 comments on commit 24ed930

Please sign in to comment.